<?php
use yii\helpers\Html;
use doumiaoduo\layer\LayerIframeWidget;
use common\components\helpers\Fun;

LayerIframeWidget::widget();

?>
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height">
    <div id="search-area" class="yx-bgf7f7f7 yx-radius5 zx-mg yx-function2 yx-pr0">
        <?= Html::beginForm(Fun::url(['student/index']), 'get', ['enctype' => 'multipart/form-data']) ?>
        <?= \common\components\helpers\Search::textInput('name', null, ['label' => '姓名', 'class' => 'search yx-width150 zx-lh24 yx-ml6']); ?>
        <?= \common\components\helpers\Search::dropDownList('year', null, [null => '请选择', 2016 => '2016', 2017 => '2017', 2018 => '2018', 2019 => '2019', 2020 => '2020'], ['label' => '年份', 'promote' => '请选择', 'class' => 'search diy_select_txt']) ?>
        <?= \common\components\helpers\Search::dropDownList('mouth', null, [null => '请选择', 1 => '一月', 2 => '二月', 3 => '三月', 4 => '四月', 5 => '五月', 6 => '六月', 7 => '七月', 8 => '八月', 9 => '九月', 10 => '十月', 11 => '十一月', 12 => '十二月'], ['label' => '月份', 'promote' => '请选择', 'class' => 'search diy_select_txt']) ?>
        <?= \common\components\helpers\Search::dropDownList('types', null, [null => '请选择', 1 => '当月', 2 => '历史'], ['label' => '统计方式', 'promote' => '请选择', 'class' => 'search diy_select_txt']) ?>
        <?= \common\components\helpers\Search::submitButton('搜索', ['id' => 'search-handle', 'class' => "yx-search yx-radius2"]); ?>
        <?php Html::endForm() ?>
    </div>

    <div class="docs-main zx-mg">
        <table id="tablesaw" class="tablesaw table yx-table1 yx-table3 table-striped with-check">
            <thead>
            <tr class="yx-bgd2f6ec">
                <th><?= \Yii::t('zhtfrontend', 'ID'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '姓名'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '昵称'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '性别'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '年龄'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '会员姓名'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '身份证号'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '是否老生'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '创建时间'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '操作'); ?></th>
            </tr>
            </thead>
            <?php if ($data): ?>
                <?php foreach ($data as $item): ?>
                    <tr data-id="<?= $item['id'] ?>">
                        <td><?= $item['id'] ?></td>
                        <td><?= $item['name'] ?></td>
                        <td><?= $item['nickname'] ?></td>
                        <td><?= $item['sex'] ?></td>
                        <td><?= $item['age'] ?></td>
                        <td><?= $item['customer_name'] ?></td>
                        <td><?= $item['IDcard'] ?></td>
                        <td><?= $item['is_old'] ?></td>
                        <td><?= $item['created_at'] ?></td>
                        <td><?= $item['common_operate'] ?></td>
                    </tr>
                <?php endforeach; ?>
            <?php endif; ?>
        </table>
        <div style="text-align: right"><?= common\components\widgets\GoPager::widget(['pagination' => $pages]) ?></div>
    </div>
</div>
